package com.example.order.model.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 创建订单请求 DTO
 * 
 * @author mall-team
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateOrderRequest {

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 收货地址
     */
    private String shippingAddress;

    /**
     * 备注
     */
    private String remark;

    /**
     * 订单明细列表
     */
    private List<OrderItemRequest> items;

    /**
     * 订单明细请求
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class OrderItemRequest {
        /**
         * SKU ID
         */
        private Long skuId;

        /**
         * SKU 名称
         */
        private String skuName;

        /**
         * 单价
         */
        private String price;

        /**
         * 购买数量
         */
        private Integer quantity;
    }
}

